package cn.touna.jss.modules.third.baiqishi.entity;

import cn.touna.risk.api.contraints.*;
import cn.touna.risk.api.contraints.facet.Four;
import cn.touna.risk.api.domain.BaseDomain;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 参数校验：
 * 1. First.class 指向eventType =
 * 2. Second.class 指向eventType =
 * 3. Three.class 指向eventType =
 * 4. Four.class 指向公共参数 =
 * Created by Steve.Tao on 2017/8/18.
 */
public class BaiqishiRequestEntity {

    public static class RiskDecisionRequest extends BaseDomain {
        @NotBlank(message = "eventType不能为空")

//        @InSet(enumSet = {"verify", "loan", "withdraw"})
        @NotEmpty
        private String eventType;
//        @NotBlank(message = "tokenKey不能为空")
        private String tokenKey;
        /*@NotBlank(message = "事件发生时间")
        @DateCheck(format = "yyyy-MM-dd hh:mm:ss")*/
        private String occurTime;
        @NotBlank
        private String name;
        @Mobile
        private String mobile;
        @IdCard
        private String idCard;
        // 居住地址
        private String address;
        // 居住省
        private String addressProvince;
        // 用户所在城市
        private String addressCity;
        // 居住区
        private String addressCounty;

        private String appId;


        @InSet(enumSet = {"h5", "web", "ios", "android"}, groups = Four.class)
        private String platform = "";

        private String latitude;
        private String longitude;
        private String ip;

        //eventType = verify
        private String account;

        //eventType = loan
        private String zmOpenId;
        private String contactsName;
        private String contactsMobile;

        //eventType = withdraw
        private String bankCardNo;
        //邮箱
        private String email;
        //社保
        private String locAfMobile;
        //公积金
        private String locSsMobile;

        // 联系人2姓名
        private String contactsNameSec;
        // 联系人2电话
        private String contactsMobileSec;
        // 工作单位名称
        private String organization;
        // 工作地址
        private String organizationAddress;
        // 单位电话
        private String organizationPhone;
        // 工作省
        private String organizationProvince;
        // 工作市
        private String organizationCity;


        public String getEmail() {
            return email;
        }

        public void setEmail(String email) {
            this.email = email;
        }

        public String getLocAfMobile() {
            return locAfMobile;
        }

        public void setLocAfMobile(String locAfMobile) {
            this.locAfMobile = locAfMobile;
        }

        public String getLocSsMobile() {
            return locSsMobile;
        }

        public void setLocSsMobile(String locSsMobile) {
            this.locSsMobile = locSsMobile;
        }

        public String getEventType() {
            return eventType;
        }

        public void setEventType(String eventType) {
            this.eventType = eventType;
        }

        public String getTokenKey() {
            return tokenKey;
        }

        public void setTokenKey(String tokenKey) {
            this.tokenKey = tokenKey;
        }

        public String getOccurTime() {
            return occurTime;
        }

        public void setOccurTime(String occurTime) {
            this.occurTime = occurTime;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getMobile() {
            return mobile;
        }

        public void setMobile(String mobile) {
            this.mobile = mobile;
        }

        public String getIdCard() {
            return idCard;
        }

        public void setIdCard(String idCard) {
            this.idCard = idCard;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public String getAddressCity() {
            return addressCity;
        }

        public void setAddressCity(String addressCity) {
            this.addressCity = addressCity;
        }

        public String getPlatform() {
            return platform;
        }

        public void setPlatform(String platform) {
            this.platform = platform;
        }

        public String getLatitude() {
            return latitude;
        }

        public void setLatitude(String latitude) {
            this.latitude = latitude;
        }

        public String getLongitude() {
            return longitude;
        }

        public void setLongitude(String longitude) {
            this.longitude = longitude;
        }

        public String getIp() {
            return ip;
        }

        public void setIp(String ip) {
            this.ip = ip;
        }

        public String getAccount() {
            return account;
        }

        public void setAccount(String account) {
            this.account = account;
        }

        public String getZmOpenId() {
            return zmOpenId;
        }

        public void setZmOpenId(String zmOpenId) {
            this.zmOpenId = zmOpenId;
        }

        public String getContactsName() {
            return contactsName;
        }

        public void setContactsName(String contactsName) {
            this.contactsName = contactsName;
        }

        public String getContactsMobile() {
            return contactsMobile;
        }

        public void setContactsMobile(String contactsMobile) {
            this.contactsMobile = contactsMobile;
        }

        public String getBankCardNo() {
            return bankCardNo;
        }

        public void setBankCardNo(String bankCardNo) {
            this.bankCardNo = bankCardNo;
        }

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getContactsNameSec() {
            return contactsNameSec;
        }

        public void setContactsNameSec(String contactsNameSec) {
            this.contactsNameSec = contactsNameSec;
        }

        public String getContactsMobileSec() {
            return contactsMobileSec;
        }

        public void setContactsMobileSec(String contactsMobileSec) {
            this.contactsMobileSec = contactsMobileSec;
        }

        public String getOrganization() {
            return organization;
        }

        public void setOrganization(String organization) {
            this.organization = organization;
        }

        public String getOrganizationAddress() {
            return organizationAddress;
        }

        public void setOrganizationAddress(String organizationAddress) {
            this.organizationAddress = organizationAddress;
        }

        public String getAddressProvince() {
            return addressProvince;
        }

        public void setAddressProvince(String addressProvince) {
            this.addressProvince = addressProvince;
        }

        public String getAddressCounty() {
            return addressCounty;
        }

        public void setAddressCounty(String addressCounty) {
            this.addressCounty = addressCounty;
        }

        public String getOrganizationPhone() {
            return organizationPhone;
        }

        public void setOrganizationPhone(String organizationPhone) {
            this.organizationPhone = organizationPhone;
        }

        public String getOrganizationProvince() {
            return organizationProvince;
        }

        public void setOrganizationProvince(String organizationProvince) {
            this.organizationProvince = organizationProvince;
        }

        public String getOrganizationCity() {
            return organizationCity;
        }

        public void setOrganizationCity(String organizationCity) {
            this.organizationCity = organizationCity;
        }
    }

    public static class DeviceFingerPrintRequest extends BaseDomain {

        @NotBlank
        private String tokenKey;

        @InSet(enumSet = {"h5", "web", "ios", "android"})
        private String platform;

        public String getTokenKey() {
            return tokenKey;
        }

        public void setTokenKey(String tokenKey) {
            this.tokenKey = tokenKey;
        }

        public String getPlatform() {
            return platform;
        }

        public void setPlatform(String platform) {
            this.platform = platform;
        }
    }

    public static class Location{
        private double longitude;
        private double latitude;

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }
    }


}
